import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/Home.vue'
import Main from '../components/Main.vue'
import addregistion from '../components/Registion/addregistion.vue'
import deleteregistion from '../components/Registion/deleteregistion.vue'
import findmoney from '../components/Registion/findmoney.vue'
import refund from '../components/Registion/refund.vue'
import doctor from '../components/Doctor/doctor.vue'
import check from '../components/Doctor/check.vue'
import test from '../components/Doctor/test.vue'
import diagnosis from '../components/Doctor/diagnosis.vue'
import medicine from '../components/Doctor/medicine.vue'
import department from '../components/setting/department.vue'
import schedul from '../components/setting/schedul.vue'
import login from '../login.vue'
import num from '../components/Doctor/num.vue'
import main2 from '../components/Main2.vue'
import main3 from '../components/Main3.vue'
import adddrug from '../components/drug/adddrug.vue'
import checkdrug from '../components/drug/checkdrug.vue'
import refunddrug from '../components/drug/refunddrug.vue'
import inspectmoney from '../components/Registion/inspectmoney.vue'
import testmoney from '../components/Registion/testmoney.vue'
import registermoney from '../components/Registion/registermoney.vue'
import inspectrefund from '../components/Registion/inspectrefund.vue'
import testrefund from '../components/Registion/testrefund.vue'
Vue.use(VueRouter)

const routes = [
	{
		path: '/main',
		name: 'main',
		component: Main,
		children: [{
				path: 'addregistion',
				name: 'addregistion',
				component: addregistion
			},
			{
				path: 'deleteregistion',
				name: 'deleteregistion',
				component: deleteregistion
			},
			{
				path: 'findmoney',
				name: 'findmoney',
				component: findmoney
			},
			{
				path: 'refund',
				name: 'refund',
				component: refund
			 },
			 {
				path: 'testrefund',
				name: 'testrefund',
				component: testrefund 
				 
			 },
			 {
			 	path: 'inspectrefund',
			 	name: 'inspectrefund',
			 	component: inspectrefund 
			 				 
			 },
			 {
			 	path: 'testmoney',
			 	name: 'testmoney',
			 	component: testmoney 
			 				 
			 },
			 {
			 	path: 'inspectmoney',
			 	name: 'inspectmoney',
			 	component: inspectmoney 
			 				 
			 },
			 {
			 	path: 'registermoney',
			 	name: 'registermoney',
			 	component: registermoney 
			 				 
			 },
			 
			// {
			// 	path: 'doctor',
			// 	name: 'doctor',
			// 	component: doctor,
			// 	children: [{
			// 			path: 'check',
			// 			name: 'check',
			// 			component: check
			// 		},
			// 		{
			// 			path: 'checkmoney',
			// 			name: 'checkmoney',
			// 			component: checkmoney
			// 		},
			// 		{
			// 			path: 'diagnosis',
			// 			name: 'diagnosis',
			// 			component: diagnosis
			// 		},
			// 		{
			// 			path: 'medicine',
			// 			name: 'medicine',
			// 			component: medicine
			// 		}

			// 	]
			// },
			// ,{
			// 	path: 'department',
			// 	name: 'department',
			// 	component: department
			// },
			// {
			// 	path: 'schedul',
			// 	name: 'schedul',
			// 	component: schedul
			// },
			// {
			// 	path:'num',
			// 	name:'num',
			// 	component:num
			// }
		]
	},
	{
		path: '/main2',
		name: 'main2',
		component: main2,
		children: [
			// {
			// 	path: 'addregistion',
			// 	name: 'addregistion',
			// 	component: addregistion
			// },
			// {
			// 	path: 'deleteregistion',
			// 	name: 'deleteregistion',
			// 	component: deleteregistion
			// },
			// {
			// 	path: 'findmoney',
			// 	name: 'findmoney',
			// 	component: findmoney
			// },
			// {
			// 	path: 'refund',
			// 	name: 'refund',
			// 	component: refund
			// },
			{
				path: 'doctor',
				name: 'doctor',
				component: doctor,
				children: [{
						path: 'check',
						name: 'check',
						component: check
					},
					{
						path: 'test',
						name: 'test',
						component: test
					},
					{
						path: 'diagnosis',
						name: 'diagnosis',
						component: diagnosis
					},
					{
						path: 'medicine',
						name: 'medicine',
						component: medicine
					}
	
				]
			 },
			// {
			// 	path: 'department',
			// 	name: 'department',
			// 	component: department
			// },
			// {
			// 	path: 'schedul',
			// 	name: 'schedul',
			// 	component: schedul
			// },
			{
				path:'num',
				name:'num',
				component:num
			}
		]
	},
	{
		path: '/main3',
		name: 'main3',
		component: main3,
		children: [
	// 		{
	// 			path: 'addregistion',
	// 			name: 'addregistion',
	// 			component: addregistion
	// 		},
	// 		{
	// 			path: 'deleteregistion',
	// 			name: 'deleteregistion',
	// 			component: deleteregistion
	// 		},
	// 		{
	// 			path: 'findmoney',
	// 			name: 'findmoney',
	// 			component: findmoney
	// 		},
	// 		{
	// 			path: 'refund',
	// 			name: 'refund',
	// 			component: refund
	// 		},
	// 		{
	// 			path: 'doctor',
	// 			name: 'doctor',
	// 			component: doctor,
	// 			children: [{
	// 					path: 'check',
	// 					name: 'check',
	// 					component: check
	// 				},
	// 				{
	// 					path: 'checkmoney',
	// 					name: 'checkmoney',
	// 					component: checkmoney
	// 				},
	// 				{
	// 					path: 'diagnosis',
	// 					name: 'diagnosis',
	// 					component: diagnosis
	// 				},
	// 				{
	// 					path: 'medicine',
	// 					name: 'medicine',
	// 					component: medicine
	// 				}
	
	// 			]
	// 		},
			{
				path: 'department',
				name: 'department',
				component: department
			},
			{
				path: 'schedul',
				name: 'schedul',
				component: schedul
			},
			{
				path:'num',
				name:'num',
				component:num
			},
			{
				path:'adddrug',
				name:'adddrug',
				component:adddrug
			},
			{
				path:'checkdrug',
				name:'checkdrug',
				component:checkdrug
			},
			{
				path:'refunddrug',
				name:'refunddrug',
				component:refunddrug
			}
		]
	},
	{
		path: '/about',
		name: 'About',
		component: () => import( /* webpackChunkName: "about" */ '../views/About.vue')
	},
	{
		path: '/',
		name: 'login',
		component: login
	}
]

const router = new VueRouter({
	mode: 'history',
	base: process.env.BASE_URL,
	routes
})

export default router
